All Questions
9 questions
-2votes
2answers
246views
Designing a database schema for a website related to my town's history
I am working on digitizing old photographs, articles, ephemera, etc. related to my town's history, and I've been tasked to put these scans I've made onto a website for the public to see. There are ...
1vote
0answers
125views
Backend Design: System requires both ElasticSearch and MySQL. In which scenario we fetch data from MySQL or ElasticSearch?
So, one of the backend system, having 5 resource types (tables) and some foreign keys as well, requires full text support for two of the tables. Also, for some use-cases, we require inner-joins for ...
0votes
1answer
335views
Does it make sense to have redundant DB fields to improve query performance, programming speed and code readability?
I am a bit torn about the database design for a solution. I have the following structure: (only the relevant fields are marked with #) +------------------+ | activities | |------------------| | ...
0votes
1answer
43views
Ensure that Room No. of a Course's Section is within the permitted Rooms for that Course with some Constraint
I am facing difficulties establishing constraints in the following situation. This is a hypothetical scenario for practicing DB designing. Imagine, a rule in a School states that the Courses there ...
-1votes
3answers
715views
DB architecture for managing items of different categories
I'm making a rental app which has many categories with unique properties Example: Category 1 Car which has Fuel, model, color, speed Category 2 Apartment which has Rooms, lift, ...
3votes
2answers
2kviews
How to Define Service Area – with Zip Codes?
I'm working on a site for at-home services. What is the best practice to define a service provider's service area? My initial thought was to define each provider’s service area as a set of zip codes. ...
5votes
3answers
3kviews
How to enforce the mandatory participation constraint at the many end in a one-to-many relationship?
Say I have the following ER diagram: Enforcing the mandatory participation constraint at the one end is easy, I simply make the foreign key (school_id) in Student NOT NULL. But how can I enforce the ...
3votes
1answer
1kviews
Am I planning my database/backend correctly?
I'm an iOS developer and to be honest I'm not really looking to become a database expert right at this moment, but I do need to know how to properly plan out what I believe to be a pretty cookie ...
3votes
5answers
18kviews
Using Autoincrement Primary keys as Foreign Keys
When creating a table, there is an option for us to set the numeric primary key as autoincrement where its value increases whenever a new data in inserted. This primary number can be used for ...